﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Modules_Banner : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string Chuoi = "";
            //DataTable dt = ConfigService.Config_GetByAll();
            //if (dt.Rows.Count > 0)
            //{
                //for (int i = 0; i < dt.Rows.Count; i++)
                //{
            string path = "~/Data/Config/e1711623-34bc-41bb-a86d-96cd2fdacc7d.swf";
                    //path = dt.Rows[i]["Banner"].ToString();
                    path = path.Remove(0, 1);
                    if (path.IndexOf(".swf") > 0)
                    {
                        Chuoi += "<embed src=\"" + path + "\" height=\"146\" align=\"middle\" width=\"960\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" wmode=\"transparent\" quality=\"high\">";
                    }
                    else
                    {
                        Chuoi += "<img src='" + path + "' runat='server' style='border:0px' width='960px' height='146px' />";
                    }
                //}
            //}
            ltrBanner.Text = Chuoi;
            //dt.Clear();
        }
    }
}